package thread;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
//线程池
public class demo5 {
    public static void main(String[] args) {
        ExecutorService service= Executors.newFixedThreadPool(4);
        for(int i = 0;i<1000;i++){
            service.submit(new Runnable() {
                @Override
                public void run() {
                    System.out.println("hello");
                }
            });
        }
    }
}
